<script setup lang="ts">
import { Condition, FieldConfig, ValueType } from '../../components/condition/src/types';
import { CompareType } from '../../components/condition/src/composition/use-compare';

const filterFields: FieldConfig[] = [
    { id: 'avatar', code: 'avatar', labelCode: 'avatar', name: '头像', editor: { type: 'text' } },
    { id: 'code', code: 'code', labelCode: 'code', name: '编号', editor: { type: 'text' } },
    { id: 'name', code: 'name', labelCode: 'name', name: '名称', editor: { type: 'text' } },
    { id: 'fullName', code: 'fullName', labelCode: 'fullName', name: '全称', editor: { type: 'text' } }
];
const conditions: Condition[] = [
    {
        id: 'avatar',
        fieldCode: 'avatar',
        fieldName: '头像',
        compareType: CompareType.Equal,
        valueType: ValueType.Value,
        value: 'Sagi',
        relation: '1'
    },
    {
        id: 'code',
        fieldCode: 'code',
        fieldName: '编号',
        compareType: CompareType.Equal,
        valueType: ValueType.Value,
        value: 'Sagi',
        relation: '1'
    },
    {
        id: 'name',
        fieldCode: 'name',
        fieldName: '名称',
        compareType: CompareType.Equal,
        valueType: ValueType.Value,
        value: 'Sagi',
        relation: '1'
    },
    {
        id: 'fullName',
        fieldCode: 'fullName',
        fieldName: '全称',
        compareType: CompareType.Equal,
        valueType: ValueType.Value,
        value: 'Sagi Chen'
    }
];
</script>
<template>
    <f-filter-bar :data="conditions" :fields="filterFields" :mode="'display-only'"></f-filter-bar>
</template>
